<?php
/** @var $this \Action */
	$this->registerResourcePackage('bootstrap');
?>
<style>
.term{
border-bottom: 1px dotted blue;
color: blue; 
}
</style>
<script>
function f(el) {
	var elem = el.parentNode.children[1];
	elem.style.display = (elem.style.display == 'none') ? "" : 'none';
}
</script>

<h2><?=$error['code']?> <?=$error['message']?></h2>
<p> <?=$error['file']?>:<?=$error['line']?></p>

<pre><?php foreach($error['codeText'] as $key => $it){?>
	<br>   <span style='color: <?= ($error['line'] == $key)? 'red':'gray'?>'><?=$key ?></span>   <?=$it?>
<?php }		
?></pre>
<p>Trace:</p>
<ul>
<?php
foreach ($trace as $t){	?>
<li><span onclick="f(this)"><span class = "term"> <?=$t['file']?></span>:<?=$t['line']?>, <?=$t['class']?>::<?=$t['function']?> </span>
<pre style = "display: none"><?php foreach($t['code'] as $key => $it){?>
	<br>   <span style='color: <?= ($t['line'] == $key)? 'red':'gray'?>'><?=$key ?></span>   <?=$it?>
<?php }		
?></pre></li>
<?php 
}
?>	
</ul>